<template>
  <result
    :isSuccess="true"
    :content="false"
    :title="email"
    :description="description">

    <template slot="action">
      <a-button size="large" type="primary">
          {{i18n('form.email','查看邮箱')}}
      </a-button>
      <a-button size="large" style="margin-left: 8px" @click="goHomeHandle">
          {{i18n('form.page','返回首页')}}
      </a-button>
    </template>

  </result>
</template>

<script>
import Result from '@/components/Result'

export default {
  name: 'RegisterResult',
  components: {
    Result
  },
  data () {
    return {
      description: this.i18n('form.description','激活邮件已发送到你的邮箱中，邮件有效期为24小时。请及时登录邮箱，点击邮件中的链接激活帐户。'),
      form: {}
    }
  },
  computed: {
    email () {
      const v = this.form && this.form.email || 'xxx'
      const title = this.i18n('message.accountYour','你的账户：')+`${v}`+this.i18n('message.registration','注册成功')
      return title
    }
  },
  created () {
    this.form = this.$route.params
  },
  methods: {
      i18n(name, text, key) {
          return this.$ti18(name, text, "viewsUser", key);
      },
    goHomeHandle () {
      this.$router.push({ name: 'Welcomelist' })
    }
  }
}
</script>

<style scoped>

</style>
